package com.wwtech.epp.ui.adapter.work;

import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.wwtech.epp.R;
import com.wwtech.epp.entity.Notice;

import java.util.List;

/**
 * 作者：Android on 2017/10/18
 * 邮箱：365941593@qq.com
 * 描述：
 */

public class InformAdapter extends BaseQuickAdapter<Notice.DataBean, BaseViewHolder> {

    public InformAdapter(@Nullable List<Notice.DataBean> data) {
        super(R.layout.item_inform_list, data);
    }

    @Override
    protected void convert(BaseViewHolder baseViewHolder, Notice.DataBean dataBean) {
        baseViewHolder.setText(R.id.title, dataBean.getTitle())
                .setText(R.id.content, dataBean.getContent())
                .setText(R.id.publicer, dataBean.getOrgTitle() + "  " + dataBean.getNickName())
                .setText(R.id.time, dataBean.getCreateTime().substring(0, 11));
    }
}
